package top.dotgo.kit.oss;

import com.aliyun.oss.OSSClient;
import com.aliyun.oss.common.auth.DefaultCredentialProvider;

/**
 * @author：jornl
 * @date : 2019/3/4 22:20
 * @des:
 */
class OssBaseKit {

    public static final String REGION = OssConfig.getREGION();
    public static final String BUCKET = OssConfig.getBUCKET();
    static final String ROLE_ARN = OssConfig.getROLE_ARN();
    static final String ACCESS_KEY_ID = OssConfig.getACCESS_KEY_ID();
    static final String ACCESS_KEY_SECRET = OssConfig.getACCESS_KEY_SECRET();
    static final Integer EXPIRATION = OssConfig.getEXPIRATION();
    static final Integer DURATION_SECONDS = OssConfig.getDURATION_SECONDS();
    private static final String ENDPOINT = OssConfig.getENDPOINT();
    static OSSClient ossClient;

    static void initClient() {
        ossClient = new OSSClient(ENDPOINT, new DefaultCredentialProvider(ACCESS_KEY_ID, ACCESS_KEY_SECRET), null);
    }

}
